<?php
header('content-type:text/html;charset=utf-8');
$u = $_GET['username'];
$p = $_GET['password'];

$link = mysqli_connect('localhost','root','','a');
mysqli_set_charset($link,'utf8');
$sql = "insert into user5 (name,age) values('$u',$p)";
$result = mysqli_query($link,$sql);
if($result){
   // 创建cookie
    echo "1";
}else{
    echo "0";
}
mysqli_close($link);
?>